home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / mpl0121.zip / MPL0121.TXT
Text File  |  1989-01-22  |  4KB  |  122 lines

  1.  
  2.  
  3. This mod should stop the entry of messages to "hyper space"
  4. I noticed on my system that some users were able to send a message
  5. to a user without a name... this should stop the problem.
  6.  
  7.  
  8.  
  9. The second mod involves the TEXT SEARCH in the message section....
  10. after observing the amount of time it took to search for TEXT
  11. in the messge base I found the problem to be in the Thread routines
  12. I added.... The Changes I made will Bypass the THREAD routines
  13. and increase the searches by about 150%. This will also decrease the
  14. the amount of access to the HARD DRIVE since the Thread files are not
  15. accessed for each message...
  16.  
  17. All Changes are dated Pe 01/16/89..... remaining code is the same and
  18. included for reference only
  19.  
  20.  
  21. Enjoy    Pete Eibl 
  22.  
  23.  
  24.  
  25.  
  26. Changes to RBBS-PC.BAS
  27.  
  28.  
  29. 2020 CALL MSGTO (HIGHEST.USER.RECORD,MESSAGE.TO$,RECEIVER.RECORD.NUM,FOUND)
  30. IF MESSAGE.TO$ = "" THEN _
  31.     RETURN            'Pe 01/16/89
  32.      IF REPLY THEN _
  33.         FOUND = TRUE : _
  34.         CALL TRIM (MESSAGE.TO$):  _
  35.         GOTO 2035 _
  36.      ELSE SUBJECT$ = ""
  37.      IF MESSAGE.TO$ = "" THEN _
  38.         RETURN
  39.      GOSUB 2065
  40. 2035 CALL MSGPROT (MESSAGE.TO$,FOUND,MESSAGE.PASSWORD$)
  41.  
  42.  
  43. 'Skip to Next.................
  44.  
  45.  
  46. 4613  CALL THREAD3(CURRENT.MESSAGE,GRN$)
  47.       ' A$ = ""  Pe 01/16/89
  48.        GOSUB 9000
  49.        IF JUST.SEARCHING THEN _
  50.           GOTO 4625
  51.        IF MESSAGES.SELECTED.INDEX > NUMBER.MESSAGES.SELECTED THEN _
  52.           GOTO 4650
  53.        CALL SKIPLINE (1)
  54. 4614   GOSUB 41000
  55.  
  56.  
  57.  
  58. Changes to  RBBSSUB1.BAS
  59.  
  60.  
  61. 59680 END SUB      ' THREAD2
  62. '
  63. ' $SUBTITLE: 'THREAD3 - a message was killed - check threaded message file'
  64. ' $PAGE
  65. '
  66. '  SUBROUTINE NAME    -- THREAD3
  67. '
  68. '  INPUT PARAMETERS   --    PARAMETER              MEANING
  69. '                           CURRENT.MESSAGE        Message's number
  70. '
  71. '  OUTPUT PARAMETERS  --     <<NONE>>
  72. '
  73. '  SUBROUTINE PURPOSE -- SUBROUTINE TO ...
  74. '
  75.       SUB THREAD3 (CURRENT.MESSAGE,GRN$) STATIC
  76. IF JUST.SEARCHING THEN _            'PE 01/16/89
  77.  EXIT SUB                           'PE 01/16/89
  78.       IF INSTR(GRN$," ") = 0 THEN
  79.          FILE.NAME$ = GRN$ + "T"
  80.        ELSE
  81.          FILE.NAME$ = LEFT$(GRN$,INSTR(GRN$," ")-1)+"T"
  82.       END IF
  83.        OPEN "R",9,FILE.NAME$,12 
  84.        FIELD 9, 6 AS CM$, 6 AS HMN$
  85.       AA$ = ""
  86.       ZZ$ = ""
  87.       FOR I = 1 TO INT(LOF(9)/12)
  88.           GET 9,I
  89.          IF RIGHT$(HMN$,1) = "K" THEN 59690
  90.          IF VAL(CM$) = CURRENT.MESSAGE AND RIGHT$(HMN$,1) <> "K" THEN 
  91.                 AA$ = AA$ + HMN$
  92.          END IF 
  93.           IF VAL(HMN$) = CURRENT.MESSAGE AND RIGHT$(CM$,1) = "K" THEN
  94.                 ZZ$ = LEFT$(CM$,5) + CX$(1)+"(deleted) "+EMPHASIZE.OFF$
  95.          END IF
  96.           IF VAL(HMN$) = CURRENT.MESSAGE AND RIGHT$(CM$,1) <> "K" THEN 
  97.                 ZZ$ = CM$
  98.          END IF
  99. 59690 NEXT I
  100. '**** Commnent out or DELETE the NEXT 4 lines ******
  101. 'IF JUST.SEARCHING THEN  'Pe 01/16/89
  102. '  CLOSE (9)             'Pe 01/16/89
  103. '  EXIT SUB              'Pe 01/16/89
  104. 'END IF                  'Pe 01/16/89
  105. ' *************************************************
  106.       IF LEN(AA$) > 0 THEN 
  107. CALL QTPUT(FG.3$+"   Reply(ies) in message number(s): "+CX$(4) + AA$+EMPHASIZE.OFF$,1)
  108.       END IF
  109.       IF LEN(ZZ$) > 0 THEN 
  110. CALL QTPUT (FG.4$+"   This message is in reply to message " +FG.1$+ ZZ$+EMPHASIZE.OFF$,1)
  111.       END IF
  112. CALL QTPUT (CX$(1)+ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"+EMPHASIZE.OFF$,1)
  113.       CLOSE (9)
  114. 59695 END SUB      ' THREAD3
  115.  
  116.  
  117.  
  118. end of changes........
  119.  
  120.  
  121.